import React, { Component } from 'react';
import { StyleSheet, View,Image,Text,TouchableWithoutFeedback } from 'react-native';
import {txt,view} from '../comm/Size';
import { Card, ListItem, Button } from 'react-native-elements'
import Icon from 'react-native-vector-icons/FontAwesome';

export default class TestPage extends Component {

    constructor(props) {
        super();
        this.state = {};
    }

    render() {
        const {title,remark,image,recordId}=this.props;

        let color = "#eaeaea";

        if (recordId) {
            color = "#339933"
        }

        var source = image ? {uri: image} : require('../assets/logo.jpg');
        return (
            <TouchableWithoutFeedback onPress={this.props.onPress}>
                <Card
                    title={title}
                    image={source}>
                    <Text style={{marginBottom: 10}}>
                        {remark}
                    </Text>
                    <Button
                        icon={{name: 'code'}}
                        backgroundColor='#03A9F4'
                        fontFamily='Lato'
                        buttonStyle={{borderRadius: 0, marginLeft: 0, marginRight: 0, marginBottom: 0}}
                        title='详情' />
                </Card>
            </TouchableWithoutFeedback>
        )
    }
}
